package com.example.demo.materialdao;

import com.example.demo.model.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by DELL on 2018/12/27.
 */
@Mapper
public interface Materialldao {
    @Select("select * from user")
    List<User> queryall();

//    @Insert("insert into user values(#{name},#{sex},#{age})")
//    int add(@Param("user") User user);

    @Select("select * from user where id=#{id}")
    User querybyid(@Param("id") Integer id);
    @Update("update user set nama=#{name},age=#{age},sex=#{sex} where id=#{id}")
    User update(@Param("user") User user);
}
